bitkeeper revision 1.1041.5.6 (40e97fb09K8Oxvzk9KeNthtMZL24Tw)
authormjw@wray-m-3.hpl.hp.com <mjw@wray-m-3.hpl.hp.com>
Mon, 5 Jul 2004 16:20:00 +0000 (16:20 +0000)
committermjw@wray-m-3.hpl.hp.com <mjw@wray-m-3.hpl.hp.com>
Mon, 5 Jul 2004 16:20:00 +0000 (16:20 +0000)
Don't call pending deferred if already called.

tools/python/xen/xend/server/controller.py

index 49d6e26ea890ca70ee318d0ddd78f3028f0c3b7b..6804331ac7ec777733cb9ddedadfad512955e17d 100755 (executable)
@@ -180,7 +180,8 @@ class ControllerFactory(CtrlMsgRcvr):
         """
         if self.dlist:
             d = self.dlist.pop(0)
-            d.callback(*args)
+            if not d.called:
+                d.callback(*args)
 
     def errDeferred(self, *args):
         """Signal an error to the top deferred object.
@@ -189,7 +190,8 @@ class ControllerFactory(CtrlMsgRcvr):
         """
         if self.dlist:
             d = self.dlist.pop(0)
-            d.errback(*args)
+            if not d.called:
+                d.errback(*args)
 
 class Controller(CtrlMsgRcvr):
     """Abstract class for a device controller attached to a domain.